package com.roncoo.web.controller;


import com.roncoo.web.entity.WebSet;
import com.roncoo.web.service.IWebSetService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author changpengyu
 * @since 2021-03-22
 */
@RestController
@RequestMapping("/webset/web-set")
public class WebSetController {
    @Resource
    private IWebSetService webSetService;
    @GetMapping("findAll")
    public WebSet findAll(){
        List<WebSet> list = webSetService.list();
        return list.get(0);
    }
    @PostMapping("updWebSet")
    public Boolean updWebSet(WebSet webSet){
        boolean update = webSetService.updateById(webSet);
        return update;
    }
}

